package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.hr.example.SalaryCalculateRuleGroupExample.*;

/**
 * 工价计算规则组
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【工价计算规则组】的参数")
@Data
public class SalaryCalculateRuleGroupAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_RULE_TYPE, example = E_RULE_TYPE)
    private Integer ruleType;

    @ApiModelProperty(notes = N_NAME, example = E_NAME, required = true)
    @NotNull(message = "规则组名称不能为空")
    @Length(max = 50, message = M_NAME_MAX)
    private String name;

    @ApiModelProperty(notes = N_COMPANY_ID, example = E_COMPANY_ID, required = true)
    @NotNull(message = M_COMPANY_ID_NOT_NULL)
    @Length(max = 32, message = M_COMPANY_ID_MAX)
    private String companyId;

    @ApiModelProperty(notes = N_SOURCE, example = E_SOURCE)
    @Length(max = 32, message = M_SOURCE_MAX)
    private String source;


}

